package com.fourWork.workFour;

public class UserMessage {
    //声明类型
    private String type;
    //声明User类型对象
    private User user;

    public UserMessage(String type, User user) {
        this.type = type;
        this.user = user;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }
    @Override
    public String toString() {
        return "字段类型:"+getType()+" "+getUser();
    }
}
